package com.cardone.platform.configuration.function;

import com.cardone.api.support.PackageServiceFunction;
import com.cardone.context.ContextHolder;
import com.cardone.platform.configuration.dto.DictionaryDto;
import com.cardone.platform.configuration.service.DictionaryService;
import org.apache.commons.collections.MapUtils;

import java.util.Map;

/**
 * Created by Administrator on 2015/3/3.
 */
public class Dictionary0001Function implements PackageServiceFunction {
    @Override
    public Object execution(Map<String, Object> parameterMap) {
        String typeCodes = MapUtils.getString(parameterMap, "typeCodes");

        return ContextHolder.getBean(DictionaryService.class).findListMapByTypeCodes(DictionaryDto.class, typeCodes);
    }
}
